import mixin from '../obj/mixin';

/**
 * 取数条件拼接
 */
export default function join(condition1: any, condition2: any, op: 'and' | 'or') {
	switch (op) {
		case 'and':
			return mixin(condition1, condition2);
		case 'or':
			return {
				$or: [condition1, condition2]
			};
	}
	return null;
}
